

<?php
class Form_model extends Model {
function Formmodel() {
// load the parent constructor
parent::Model();
}
function submit_posted_data() {
// db is initialized in the controller, to interact with the database.
$this->db->insert('PROVINCE',$_POST);    
}
function get_all_data() {
// again, we use the db to get the data from table ‘form’
$data['result']=$this->db->get('PROVINCE');
return $data['result'];
}
}
?>
